package com.commerceE.dao.impl;

import java.util.List;

import com.commerceE.common.dao.GenericIBatisDaoImpl;
import com.commerceE.dao.ImageDao;
import com.commerceE.domain.Images;
import com.commerceE.vo.ImageSearchVo;

public class ImageDaoImpl extends GenericIBatisDaoImpl<Images> implements
		ImageDao {

	@Override
	public String getNAMESPACE() {
		return Images.class.getName();
	}
	
	public List<Images> getImagesByInstanceId(Long instanceId){
		return getSqlSession().selectList(getNAMESPACE() +".selectByInstanceId",instanceId);
	}
	
	public List<Images> getImagesByInstanceIdAndImageType(Long instanceId, String imageType){
		return getSqlSession().selectList(getNAMESPACE() +".getImagesByInstanceIdAndImageType",new ImageSearchVo(instanceId,imageType));
	}

}
